#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
  long long t,y,i,j,n;
  bool flag;
  cin>>t;
  vector<long long> arr(t);
  for(auto& x:arr)cin>>x;
  for(auto& x:arr){
    flag=0;
    if(x%4==0){
      cout<<"Yes"<<endl;
      continue;
    }
    vector<int> num;
    y=x;
    while(y){
      num.push_back(y%10);
      y/=10;
    }
    reverse(num.begin(),num.end());
    for(i=0;i<num.size()&&!flag;i++){
      for(j=i+1;j<=num.size()&&!flag;j++){
        auto re=num;
        n=0;
        re.erase(re.begin()+i,re.begin()+j);
        if(re.empty()) continue;
        for(auto& z:re) n=n*10+z;
        if(n%4==0)flag=1;
      }
    }
    cout<<(flag?"Yes":"No")<<endl;
  }
}